﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using ChurchDiary.BLL;
using ChurchDiary.TableEntity;
using ChurchWebsite.Controllers;

namespace ChurchWebsite.Areas.Church.Controllers
{
    public class PrayerGroupsController : BaseController
    {
        //
        // GET: /Church/PrayerGroups/

        public ActionResult Index()
        {
            return View();
        }
        public JsonResult AddPrayerGroup(EntityPrayerGroup PrayerGroup)
        {
            return Json(new BLL_Church().InsertPrayerGroup(PrayerGroup));
        }
        public JsonResult UpdatePrayerGroup(EntityPrayerGroup PrayerGroup)
        {
            return Json(new BLL_Church().UpdatePrayerGroup(PrayerGroup));
        }
        public JsonResult DeletePrayerGroup(Guid dataId)
        {
            return Json(new BLL_Church().DeletePrayerGroup(dataId));
        }
        public JsonResult GetPrayerGroups()
        {
            return Json(new BLL_Church().GetPrayerGroup(),JsonRequestBehavior.AllowGet);
        }
        public JsonResult GetPrayerGroup(Guid dataId)
        {
            return Json(new BLL_Church().GetPrayerGroup(dataId), JsonRequestBehavior.AllowGet);
        }
    }
}
